import { message } from 'antd'
/*
  封装的Message函数，可以被其他组件调用来显示消息
    import { showMessage } from '@/components/antd-comp/message'
    showMessage({
      content: 'xxx',
      type: 'success info error warning open loading'
    })
*/
export const showMessage = options => {
  const { content, type = 'info', duration = 3, ...rest } = options

  // 调用Ant Design的message API
  message[type](content, duration, rest.onClose)
}
